package com.verlet.springbootdemo.simple.nettyrpc.client.scan;

import com.verlet.springbootdemo.simple.nettyrpc.client.NettyRpcClientService;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 * 自定义扫描注解
 *
 * @author verlet
 * @date 2020/4/9
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@Import({NettyRpcClientRegistrar.class, NettyRpcClientService.class})
public @interface EnableNettyRpcClient {

    /**
     * 扫描的包名，如果为空，则根据启动类所在的包名扫描
     * @see com.verlet.springbootdemo.simple.nettyrpc.client.scan.NettyRpcClientRegistrar#getBasePackages
     */
    String[] basePackages() default {};

    /**
     * 扫描的字节码类型，可根据字节码类型获取对应的包路径
     */
    Class<?>[] basePackageClasses() default {};
}
